<?php
/*i
*/

class Arr
{

	static function getRandom($array, $number=1)
	//i) static function
	{
		$count = count($array);
		$number = $number < $count ? $number : $count;
		$keys = array_rand($array, $number);
		$ret = array();
		foreach($keys as $key)
		{
			$ret[] = $array[$key];
		}
		return $ret;
	}
	
	static function popKey($array, $key)
	{
		$r = $array['key'];
		unset($array['key']);
		return $r;
	}

	
}

?>